package com.jch.helloworld.configBeans.generic;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMain {

    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("beans/beans-generic.xml");
        // 依据 传入T的类型来确定自己调用的Repository类别
        DemoService demoService = (DemoService) ctx.getBean("demoService");
        demoService.add();
    }
}
